import {windowApi} from "@/apis/common/window.js";
import {apiParam} from "@/utils/index.js";
import {skyMsgError} from "@/utils/sky.js";

/**
 * 查询标准开窗新接口
 */
export const getNewInfo = async (data) => {
  const dataQuery = apiParam("2.0", "SYS.StandOpenWindowsDAL.QuerybyRecordId", [data]);
  try {
    const response = await windowApi(dataQuery);
    if (response.status >= 0) {
      return Promise.resolve(response.data);
    } else {
      skyMsgError(response.data.msg || "数据查询失败，请刷新重试🌻");
    }
  } catch (error) {
    skyMsgError("数据查询失败，请刷新重试🌻");
  }
};

